#include "gd32f10x.h"
#include "systick.h"
#include <stdio.h>
#include "main.h"
#include "usart_com.h"
#include "led.h"
#include "relay.h"

/*!
    \brief      main function
    \param[in]  none
    \param[out] none
    \retval     none
*/

int main(void)
{
    systick_config();
    usart0_init(9600);
    led_init();
    relay_init();
    while(1)
    {

    }
}

/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
    //    usart_data_transmit(EVAL_COM0, (uint8_t)ch);
    //    while(RESET == usart_flag_get(EVAL_COM0, USART_FLAG_TBE));

    return ch;
}
